package com.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.study.demo.model.User;
import com.study.demo.service.UserService;

@Controller
public class WebController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping(value="/aa", method=RequestMethod.GET)
	public @ResponseBody String getInfo(){
		User user = userService.getUserInfo(1);
		return user.toString();
	}

}
